Check out my twitter script by CMXads
Viking gear Gear Gifts and Apparel | Sell your soul Believeth in me an hath everlasting life | Evil gear Christmas is almost here | Till death do us part Axels New Music releases |
here are some of the best and useful php scripts and snippets to help in your projects. Php displayed below. Use the search for specific script lookups. Click the category links to view scripts in Javascript and cgi. To add your own script click the link and add your useful script example.
scraper scrape html using domxml return rip html data from file or url and display
by editing html tags to search for
domxml dom xml content scraper
dom-xml-scraper date added Jan 2013
<?php
$html= file_get_contents($html);
// check if DomXML is ava
ilable:
if (!function_exists('DomDocument')){
die('DomXML extens
ion is not available :-(');
}
print '<pre>';
// create new DO
M object:
$dom = new DomDocument();
// load HTML code:
$dom->loa
dHtml($html);
// get tags by tagname (all <a> tags / links):
$tag
s = $dom->getElementsByTagName('a');
// loop trough all links:
fo
reach ($tags as $a){
print '<b>' . $a->nodeValue . '</b><br/>'
;
// does this tag have attributes:
if ($a->hasAttributes
()){
// loop trough all attributes:
foreach (
$a->attributes as $attribute){
print '- ' . $attrib
ute->name . ': ' . $attribute->value;
print "<br/>";
}
}
print "<hr/>";
}
print '</p
re>';
?>